import pytest

from day05.duBiaoGe import DoBiaoGe
from day05.mojisuanji import JiSuanQi

#l=[(5,2,10),(-3,5,-15),(2,'m','非法输入')]
f=r'D:\软测\新建文件夹\3-18 python\day05\data\yunSuanData.xlsx'
#l= DoBiaoGe().doExeRead(f,'cheng',2,11,2,5)
l=DoBiaoGe().doExeRead(f,'chu',2,12,2,5)
class TestCheng():


    # @pytest.mark.parametrize('a,b,yq',
    #                          l,
    #                          ids=['ok','ok','noF']
    #                          )
    @pytest.mark.parametrize('title,a,b,yq',
                             l
                             )

    def testcheng(self,title,a,b,yq):
        ji = JiSuanQi()
        #ch=ji.cheng(a,b)
        ch=ji.chu(a,b)
        if isinstance(ch,(int,float)) :
            assert yq==ch
        else:
            assert yq in ch




















